package org.michaelrenaud.pathfinder.client.gin;

import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
import com.gwtplatform.mvp.client.gin.DefaultModule;

import org.michaelrenaud.pathfinder.client.core.app.AppPresenter;
import org.michaelrenaud.pathfinder.client.core.app.AppView;
import org.michaelrenaud.pathfinder.client.place.ClientPlaceManager;
import org.michaelrenaud.pathfinder.client.place.DefaultPlace;
import org.michaelrenaud.pathfinder.client.place.NameTokens;
import org.michaelrenaud.pathfinder.client.core.app.character.CharacterPresenter;
import org.michaelrenaud.pathfinder.client.core.app.character.CharacterView;
import org.michaelrenaud.pathfinder.client.core.app.combat.CombatPresenter;
import org.michaelrenaud.pathfinder.client.core.app.combat.CombatView;

public class ClientModule extends AbstractPresenterModule {

	@Override
	protected void configure() {
		install(new DefaultModule(ClientPlaceManager.class));

		bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.character);
		
		bindPresenter(AppPresenter.class, AppPresenter.MyView.class, AppView.class, AppPresenter.MyProxy.class);
		bindPresenter(CharacterPresenter.class, CharacterPresenter.MyView.class, CharacterView.class, CharacterPresenter.MyProxy.class);

		bindPresenter(CombatPresenter.class, CombatPresenter.MyView.class, CombatView.class,
				CombatPresenter.MyProxy.class);
	}
}
